/*
 * DesignList.java
 *
 * Created on September 18, 2007, 4:46 PM
 */

package jia.editor.lists;

import jia.editor.EditorMain;
import jia.tools.PanelSwapper;

/**
 *
 * @author  estell
 */
public class pnl_DesignList extends javax.swing.JPanel {
    
    /** Creates new form DesignList */
    public pnl_DesignList() {
        initComponents();
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
    private void initComponents() {
        pop_DesignListContext = new javax.swing.JPopupMenu();
        mnu_DesignEdit = new javax.swing.JMenuItem();
        mnu_DesignDelete = new javax.swing.JMenuItem();
        sp_DesignListMain = new javax.swing.JSplitPane();
        scrl_DesignTable = new javax.swing.JScrollPane();
        tbl_DesignList = new javax.swing.JTable();
        scrl_DesignDetails = new javax.swing.JScrollPane();
        txt_DesignDetails = new javax.swing.JTextPane();
        btn_DesignAdd = new javax.swing.JButton();
        btn_DesignCancel = new javax.swing.JButton();
        btn_DesignEdit = new javax.swing.JButton();
        btn_DesignDelete = new javax.swing.JButton();

        mnu_DesignEdit.setText(java.util.ResourceBundle.getBundle("jia_ui/images/formUI").getString("btn_Edit_lbl"));
        mnu_DesignEdit.setToolTipText(java.util.ResourceBundle.getBundle("jia_ui/images/formUI").getString("btn_Edit"));
        mnu_DesignEdit.setActionCommand(java.util.ResourceBundle.getBundle("jia_ui/images/formUI").getString("btn_Edit_lbl"));
        mnu_DesignEdit.setLabel(java.util.ResourceBundle.getBundle("jia_ui/images/formUI").getString("btn_Edit_lbl"));
        mnu_DesignEdit.setName(java.util.ResourceBundle.getBundle("jia_ui/images/formUI").getString("btn_Edit_lbl"));
        pop_DesignListContext.add(mnu_DesignEdit);
        mnu_DesignEdit.getAccessibleContext().setAccessibleName(java.util.ResourceBundle.getBundle("jia_ui/images/formUI").getString("btn_Edit_lbl"));
        mnu_DesignEdit.getAccessibleContext().setAccessibleDescription(java.util.ResourceBundle.getBundle("jia_ui/images/formUI").getString("btn_Edit"));

        mnu_DesignDelete.setText(java.util.ResourceBundle.getBundle("jia_ui/images/formUI").getString("btn_Delete_lbl"));
        mnu_DesignDelete.setToolTipText(java.util.ResourceBundle.getBundle("jia_ui/images/formUI").getString("btn_Delete"));
        mnu_DesignDelete.setActionCommand(java.util.ResourceBundle.getBundle("jia_ui/images/formUI").getString("btn_Delete_lbl"));
        mnu_DesignDelete.setLabel(java.util.ResourceBundle.getBundle("jia_ui/images/formUI").getString("btn_Delete_lbl"));
        mnu_DesignDelete.setName(java.util.ResourceBundle.getBundle("jia_ui/images/formUI").getString("btn_Delete_lbl"));
        pop_DesignListContext.add(mnu_DesignDelete);
        mnu_DesignDelete.getAccessibleContext().setAccessibleName(java.util.ResourceBundle.getBundle("jia_ui/images/formUI").getString("btn_Delete_lbl"));
        mnu_DesignDelete.getAccessibleContext().setAccessibleDescription(java.util.ResourceBundle.getBundle("jia_ui/images/formUI").getString("btn_Delete"));

        sp_DesignListMain.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1), java.util.ResourceBundle.getBundle("jia_ui/images/formUI").getString("title_Designs"), javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.BELOW_TOP));
        sp_DesignListMain.setDividerLocation(400);
        sp_DesignListMain.setDividerSize(7);
        sp_DesignListMain.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
        sp_DesignListMain.setOneTouchExpandable(true);
        sp_DesignListMain.setPreferredSize(new java.awt.Dimension(642, 558));
        tbl_DesignList.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null},
                {null, null},
                {null, null},
                {null, null}
            },
            new String [] {
                "Name", "Enabled"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.Boolean.class
            };
            boolean[] canEdit = new boolean [] {
                false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        scrl_DesignTable.setViewportView(tbl_DesignList);

        sp_DesignListMain.setTopComponent(scrl_DesignTable);

        txt_DesignDetails.setEditable(false);
        scrl_DesignDetails.setViewportView(txt_DesignDetails);

        sp_DesignListMain.setRightComponent(scrl_DesignDetails);

        btn_DesignAdd.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jia_ui/images/add.png")));
        btn_DesignAdd.setText(java.util.ResourceBundle.getBundle("jia_ui/images/formUI").getString("btn_Add_lbl"));
        btn_DesignAdd.setToolTipText(java.util.ResourceBundle.getBundle("jia_ui/images/formUI").getString("btn_Add"));
        btn_DesignAdd.setActionCommand(java.util.ResourceBundle.getBundle("jia_ui/images/formUI").getString("btn_Add_lbl"));
        btn_DesignAdd.setLabel(java.util.ResourceBundle.getBundle("jia_ui/images/formUI").getString("btn_Add_lbl"));
        btn_DesignAdd.setName(java.util.ResourceBundle.getBundle("jia_ui/images/formUI").getString("btn_Add_lbl"));
        btn_DesignAdd.setPreferredSize(new java.awt.Dimension(132, 30));
        btn_DesignAdd.getAccessibleContext().setAccessibleName(java.util.ResourceBundle.getBundle("jia_ui/images/formUI").getString("btn_Add_lbl"));
        btn_DesignAdd.getAccessibleContext().setAccessibleDescription(java.util.ResourceBundle.getBundle("jia_ui/images/formUI").getString("btn_Add"));

        btn_DesignCancel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jia_ui/images/door_out.png")));
        btn_DesignCancel.setText(java.util.ResourceBundle.getBundle("jia_ui/images/formUI").getString("btn_Cancel_lbl"));
        btn_DesignCancel.setToolTipText(java.util.ResourceBundle.getBundle("jia_ui/images/formUI").getString("btn_Cancel"));
        btn_DesignCancel.setActionCommand(java.util.ResourceBundle.getBundle("jia_ui/images/formUI").getString("btn_Cancel_lbl"));
        btn_DesignCancel.setLabel(java.util.ResourceBundle.getBundle("jia_ui/images/formUI").getString("btn_Cancel_lbl"));
        btn_DesignCancel.setName(java.util.ResourceBundle.getBundle("jia_ui/images/formUI").getString("btn_Cancel_lbl"));
        btn_DesignCancel.setPreferredSize(new java.awt.Dimension(132, 30));
        btn_DesignCancel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_DesignCancelActionPerformed(evt);
            }
        });

        btn_DesignCancel.getAccessibleContext().setAccessibleName(java.util.ResourceBundle.getBundle("jia_ui/images/formUI").getString("btn_Cancel_lbl"));
        btn_DesignCancel.getAccessibleContext().setAccessibleDescription(java.util.ResourceBundle.getBundle("jia_ui/images/formUI").getString("btn_Cancel"));

        btn_DesignEdit.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jia_ui/images/pencil.png")));
        btn_DesignEdit.setText(java.util.ResourceBundle.getBundle("jia_ui/images/formUI").getString("btn_Edit_lbl"));
        btn_DesignEdit.setToolTipText(java.util.ResourceBundle.getBundle("jia_ui/images/formUI").getString("btn_Edit"));
        btn_DesignEdit.setActionCommand(java.util.ResourceBundle.getBundle("jia_ui/images/formUI").getString("btn_Edit_lbl"));
        btn_DesignEdit.setLabel(java.util.ResourceBundle.getBundle("jia_ui/images/formUI").getString("btn_Edit_lbl"));
        btn_DesignEdit.setName(java.util.ResourceBundle.getBundle("jia_ui/images/formUI").getString("btn_Edit_lbl"));
        btn_DesignEdit.setPreferredSize(new java.awt.Dimension(132, 30));
        btn_DesignEdit.getAccessibleContext().setAccessibleName(java.util.ResourceBundle.getBundle("jia_ui/images/formUI").getString("btn_Edit_lbl"));
        btn_DesignEdit.getAccessibleContext().setAccessibleDescription(java.util.ResourceBundle.getBundle("jia_ui/images/formUI").getString("btn_Edit"));

        btn_DesignDelete.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jia_ui/images/delete.png")));
        btn_DesignDelete.setText(java.util.ResourceBundle.getBundle("jia_ui/images/formUI").getString("btn_Delete_lbl"));
        btn_DesignDelete.setToolTipText(java.util.ResourceBundle.getBundle("jia_ui/images/formUI").getString("btn_Delete"));
        btn_DesignDelete.setActionCommand(java.util.ResourceBundle.getBundle("jia_ui/images/formUI").getString("btn_Delete_lbl"));
        btn_DesignDelete.setLabel(java.util.ResourceBundle.getBundle("jia_ui/images/formUI").getString("btn_Delete_lbl"));
        btn_DesignDelete.setName(java.util.ResourceBundle.getBundle("jia_ui/images/formUI").getString("btn_Delete_lbl"));
        btn_DesignDelete.setPreferredSize(new java.awt.Dimension(132, 30));
        btn_DesignDelete.getAccessibleContext().setAccessibleName(java.util.ResourceBundle.getBundle("jia_ui/images/formUI").getString("btn_Delete_lbl"));
        btn_DesignDelete.getAccessibleContext().setAccessibleDescription(java.util.ResourceBundle.getBundle("jia_ui/images/formUI").getString("btn_Delete"));

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(sp_DesignListMain, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(btn_DesignEdit, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(btn_DesignDelete, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(btn_DesignCancel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(btn_DesignAdd, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                    .add(layout.createSequentialGroup()
                        .add(20, 20, 20)
                        .add(btn_DesignAdd, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(btn_DesignEdit, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(btn_DesignDelete, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .add(btn_DesignCancel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(sp_DesignListMain, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(11, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents

    private void btn_DesignCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_DesignCancelActionPerformed
        PanelSwapper.swap(EditorMain.p_defaultAdminPanel, this); 
    }//GEN-LAST:event_btn_DesignCancelActionPerformed
    
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btn_DesignAdd;
    private javax.swing.JButton btn_DesignCancel;
    private javax.swing.JButton btn_DesignDelete;
    private javax.swing.JButton btn_DesignEdit;
    private javax.swing.JMenuItem mnu_DesignDelete;
    private javax.swing.JMenuItem mnu_DesignEdit;
    private javax.swing.JPopupMenu pop_DesignListContext;
    private javax.swing.JScrollPane scrl_DesignDetails;
    private javax.swing.JScrollPane scrl_DesignTable;
    private javax.swing.JSplitPane sp_DesignListMain;
    private javax.swing.JTable tbl_DesignList;
    private javax.swing.JTextPane txt_DesignDetails;
    // End of variables declaration//GEN-END:variables
    
}
